namespace Plugins.Engine.Internal
{
    using System;
    using System.Collections.Generic;
    using Plugins.Core;
    using Plugins.Core.Interfaces;
    using Plugins.Interfaces;

    [Serializable]
    internal class PluginObjectCollection : List<IPluginObjectInternal>, IPluginObjectCollection
    {
        public void ProcessObject(PluginObjectAction action)
        {
            foreach (IPluginObjectInternal item in this)
            {
                item.ProcessObject(action);
            }
        }
        public bool ProcessObject(PluginObjectPredicate match)
        {
            foreach (IPluginObjectInternal item in this)
            {
                item.ProcessObject(match);
            }
            return true;
        }
    }
}

